package org.x.log.es;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.time.LocalDateTime;

@Getter
@Setter
@Document(indexName = "noolumen_system_log")
public class SysSystemLogES {
    @Id
    private String id;

    @Field(type = FieldType.Keyword)
    private String logLevel;

    @Field(type = FieldType.Keyword)
    private String loggerName;

    @Field(type = FieldType.Text)
    private String message;

    @Field(type = FieldType.Text)
    private String exceptionStack;

    @Field(type = FieldType.Date, format = DateFormat.date_hour_minute_second)
    private LocalDateTime createTime;
}
